package com.jpmc.iris;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.UnavailableException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ServletBomb extends HttpServlet {
	@Override
	public void init() throws ServletException {
		System.out.println("About to throw an exception...");
		throw new UnavailableException("BOOM");
	}
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		resp.getWriter().println("DO GET");
		resp.getWriter().close();
	}
}
